﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Category : WebPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(BLL.CmsBLL));
            if (Request.QueryString["cid"] != null)
            {
                string ParentTitle = string.Empty;
                int ParentID = 0;
                try
                {
                    ParentID = int.Parse("0" + new BLL.CmsBLL().Category_GetParentIDByCateID(int.Parse("0" + Request.QueryString["cid"].ToString())));
                }
                catch { }
                if (ParentID > 0)
                    ParentTitle = "	: " + new BLL.CmsBLL().Category_GetTitle(ParentID);

                Page.Title = BLL.CommonBLL.MainTitle + ParentTitle + " : " + new BLL.CmsBLL().Category_GetTitle(int.Parse("0" + Request.QueryString["cid"].ToString()));
            }
            else
            {
                Page.Title = BLL.CommonBLL.MainTitle;
            }
        }
    }
}